import Request from "@/utils/request.js";

export function list(data){
    return Request({
        url: "/api/role/list",
        method: "post",
        headers: {'Content-Type': 'application/json'},
        data: data
    })
}

export function getAll(){
    return Request({
        url: "/api/role/all",
        method: "get"
    })
}

export function remove(ids) {
    return Request({
        url: "/api/role/"+ids,
        method: "delete"
    })
}

export function update(data){
    return Request({
        url: "/api/role",
        method: "put",
        headers: {'Content-Type': 'application/json'},
        data:data
    })
}

export function add(data){
    return Request({
        url: "/api/role",
        method: "post",
        headers: {'Content-Type': 'application/json'},
        data:data
    })
}

